//
//  MessageHeadView.m
//  WBBaseProject
//
//  Created by 吴斌 on 2018/4/4.
//  Copyright © 2018年 吴斌. All rights reserved.
//

#import "MessageHeadView.h"

@implementation MessageHeadView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        [self setupUI];
    }
    return self;
}

- (void)setupUI
{
    UIView *line = [[UIView alloc] init];
    line.backgroundColor = WB_RGBColor(244, 244, 244);
    [self addSubview:line];
    [line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(0);
        make.width.equalTo(1);
        make.height.equalTo(30);
    }];
    
    //投资交易
    UIButton *investBtn = [UIButton ba_buttonWithFrame:CGRectMake(0, 0, self.mm_width / 2 - 0.5,  self.mm_height) title:@"投资交易" titleColor:WB_HEX_COLOR(0x333333) titleFont:[UIFont systemFontOfSize:13] image:[UIImage imageNamed:@"财务投资"] backgroundColor:[UIColor clearColor]];
    [investBtn ba_button_setButtonLayoutType:BAKit_ButtonLayoutTypeCenterImageTop padding:-5.0f];
    investBtn.tag = 1000;
    [investBtn addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:investBtn];
    
    //借款动态
    UIButton *borrowBtn = [UIButton ba_buttonWithFrame:CGRectMake(self.mm_width / 2 + 0.5, 0, self.mm_width / 2 - 0.5,  self.mm_height) title:@"借款动态" titleColor:WB_HEX_COLOR(0x333333) titleFont:[UIFont systemFontOfSize:13] image:[UIImage imageNamed:@"朋友圈"] backgroundColor:[UIColor clearColor]];
    [borrowBtn ba_button_setButtonLayoutType:BAKit_ButtonLayoutTypeCenterImageTop padding:-5.0f];
    borrowBtn.tag = 1000;
    [borrowBtn addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:borrowBtn];
}

- (void)click:(UIButton *)sender
{
    
}

@end
